package com.example.mall.domain;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;

import java.math.BigDecimal;
import java.util.Date;

import java.io.Serializable;

/**
 * <p>
 * 销售数据统计表
 * </p>
 *
 * @author whale
 * @since 2025-05-16
 */
@TableName("tb_sales_statistics")
public class SalesStatistics extends Model<SalesStatistics> {

    private static final long serialVersionUID = 1L;

    /**
     * 统计记录唯一标识
     */
    @TableId("stat_id")
    private Long statId;
    /**
     * 统计日期
     */
    @TableField("stat_date")
    private Date statDate;
    /**
     * 统计周期（日、周、月）
     */
    @TableField("stat_period")
    private String statPeriod;
    /**
     * 总销售额
     */
    @TableField("total_sales")
    private BigDecimal totalSales;
    /**
     * 订单数量
     */
    @TableField("order_count")
    private Integer orderCount;
    /**
     * 创建时间
     */
    @TableField("create_date")
    private Date createDate;
    /**
     * 更新时间
     */
    @TableField("update_date")
    private Date updateDate;


    public Long getStatId() {
        return statId;
    }

    public void setStatId(Long statId) {
        this.statId = statId;
    }

    public Date getStatDate() {
        return statDate;
    }

    public void setStatDate(Date statDate) {
        this.statDate = statDate;
    }

    public String getStatPeriod() {
        return statPeriod;
    }

    public void setStatPeriod(String statPeriod) {
        this.statPeriod = statPeriod;
    }

    public BigDecimal getTotalSales() {
        return totalSales;
    }

    public void setTotalSales(BigDecimal totalSales) {
        this.totalSales = totalSales;
    }

    public Integer getOrderCount() {
        return orderCount;
    }

    public void setOrderCount(Integer orderCount) {
        this.orderCount = orderCount;
    }

    public Date getCreateDate() {
        return createDate;
    }

    public void setCreateDate(Date createDate) {
        this.createDate = createDate;
    }

    public Date getUpdateDate() {
        return updateDate;
    }

    public void setUpdateDate(Date updateDate) {
        this.updateDate = updateDate;
    }

    @Override
    public String toString() {
        return "SalesStatistics{" +
        ", statId=" + statId +
        ", statDate=" + statDate +
        ", statPeriod=" + statPeriod +
        ", totalSales=" + totalSales +
        ", orderCount=" + orderCount +
        ", createDate=" + createDate +
        ", updateDate=" + updateDate +
        "}";
    }
}
